package com.app.logger.pojo.request;


import com.app.core.mvc.serialization.argument.LongEncryptJsonConverter;
import com.app.logger.model.LoggerType;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @author WangJie
 * @date 2023/7/19 17:18
 * @apiNote
 */
@Data
public class LoggerRequest {

    @ApiModelProperty(name = "id", value = "主键")
    @LongEncryptJsonConverter
    protected Long id;

    @ApiModelProperty(value = "请求唯一标识", example = "1", position = 7)
    private String xid;

    @ApiModelProperty(value = "IP地址", example = "1", position = 8)
    private String clientIp;

    @ApiModelProperty(value = "请求参数", example = "1", position = 9)
    private String requestParam;

    @ApiModelProperty(value = "请求类型", example = "1", position = 10)
    private String requestType;

    @ApiModelProperty(value = "请求路径", example = "1", position = 11)
    private String requestUri;

    @ApiModelProperty(value = "请求方法", example = "1", position = 12)
    private String requestMethod;

    @ApiModelProperty(value = "请求结果", example = "1", position = 13)
    private String requestResult;

    @ApiModelProperty(value = "操作人用户名称", example = "1", position = 14)
    private String username;

    @ApiModelProperty(value = "操作人用户账户", example = "1", position = 15)
    private String userId;

    @ApiModelProperty(value = "日志描述", example = "1", position = 16)
    private String description;

    @ApiModelProperty(value = "耗时", example = "1", position = 17)
    private Long costTime;

    @ApiModelProperty(value = "日志类型", example = "1", position = 18)
    private LoggerType logType;

    @ApiModelProperty(value = "异常信息", example = "1", position = 19)
    private String errorInfo;

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date startDate;

}
